package cn.com.pc.content.schedule;

import cn.com.pc.content.annotation.RedisLock;
import cn.com.pc.content.service.TagImportService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;

@Service
public class TagSchedule {

    @Autowired
    private TagImportService tagImportService;

    /**
     * 每天晚上1点更新3天内更新的产品库标签
     */
    @Scheduled(cron = "0 0 1 * * *")
    @RedisLock
    public void importTagsFromRacDB() {
        tagImportService.importTagsFromRacDB(3, 0);
    }

}
